<div class="tiens index">
	<h2><?php if (count($tiens)>0) { echo __($tiens[0] ['Ctrinh']['tenctrinh']);?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('Stt','id');?></th>
		
			<th><?php echo $this->Paginator->sort('Nguồn vốn','nguonvon_id');?></th>
			<th><?php echo $this->Paginator->sort('Số tiền','sotienvon');?></th>
			<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
	$tongvon=0;
	$i = 0;
	foreach ($tiens as $tien):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i; ?>&nbsp;</td>
		
		<td>
		<!--	<?php echo $this->Html->link($tien['Nguonvon']['tennv'], array('controller' => 'nguonvons', 'action' => 'view', $tien['Nguonvon']['id'])); ?>-->
		<?php echo $tien['Nguonvon']['tennv']; ?>
		</td>
		<td><?php echo number_format($tien['Tien']['sotienvon']); $tongvon+=$tien['Tien']['sotienvon']?> &nbsp;</td> 
		<td class="actions">
			
			
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete', $tien['Tien']['id'],$idct), null, sprintf(__('Are you sure you want to delete # %s?', true), $tien['Tien']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<!-- <p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p> -->

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Lùi lại', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Tiếp theo', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
	<div class="actions">
	<!--<h3><?php __('Actions'); ?></h3>-->
	<ul>
		<li><?php echo $this->Html->link(__('Thêm nguồn vốn', true), array('action' => 'add',$idct)); ?></li>
				
		
		
	</ul>
</div>
</div>
<?php } else { echo ('Chưa có nguồn vốn. Anh (chị) hãy thêm nguồn vốn cho công trình'); echo '</div>';}?>

